package jp.dodododo.aop.interceptors;

import jp.dodododo.aop.annotation.Enhance;

import org.aopalliance.intercept.Invocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * {@.en Interceptor for simple trace. It doesn't output the argument value and the return value.}
 * 
 * <br />
 * 
 * {@.ja 引数や戻り値を出力しない単純なトレース用のInterceptorです。}
 * 
 * @author Satoshi Kimura
 */
@Enhance(false)
public class SimpleTraceInterceptor extends TraceInterceptor {

	private static final Log logger = LogFactory.getLog(SimpleTraceInterceptor.class);

	private static final SimpleTraceInterceptor INSTANCE = new SimpleTraceInterceptor();

	public static SimpleTraceInterceptor getInstance() {
		return INSTANCE;
	}

	@Override
	protected void appendArgsInfo(StringBuilder buf, Invocation invocation) {
		// empty
	}

	@Override
	protected void appendReturnInfo(StringBuilder buf, Object ret) {
		// empty
	}

	@Override
	protected Log getLogger(Invocation invocation) {
		return logger;
	}

}
